package com.mall.ibatis.persistence.iface;

import java.util.List;

import com.mall.ibatis.bean.Function;
import com.mall.ibatis.bean.FunctionMethod;
import com.mall.ibatis.bean.Method;
import com.mall.ibatis.bean.Role;


public interface RoleDAO
{
	public List<Role> selectAllRole() throws Exception;
	public Role selectRole(Role role)  throws Exception;
	public void insertRole(Role role) throws Exception;
	public void updateRole(Role role) throws Exception;
	public void deleteRole(Role role) throws Exception;
	
	public List<Role> selectRolesByOperatorID(String operatorID) throws Exception;
	public void updateOperatorRole(String operatorID,String roleIDs) throws Exception;
	
	//ryh
	public List<Function> roleLook();
	//查询出每个功能模块中有哪些方法
	public List<Method> selectAllMethod();
	//添加方法和功能的对应关系
	public String addMethodFunction(FunctionMethod fm);
	//添加方法和功能对应关系前先按照角色的id来删除，方便实现覆盖操作
	public int deleteMethodFunction(String id) throws Exception;
	//向服务器请求勾选了哪些方法并返回给修改树状窗口
	public List<FunctionMethod> methodIsCheck(String id);
	//查询出功能勾选
	public List<String> functionIsCheck(String id);
	//批量插入功能id到role_function表
	public void addRoleFunction(String id, String string);
	//先删除已经有的功能
	public void deleteRoleFunction(String id) throws Exception;
	//ryh
	
	
	
	
}